package com.ruoyi.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.Goods;
import com.ruoyi.system.domain.vo.GoodsDetailVo;
import com.ruoyi.system.domain.vo.GoodsQueryVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface GoodsMapper extends BaseMapper<Goods> {


    @Select("select t1.*,t2.name categoryName from app_goods t1 left join app_category t2 on t1.category=t2.id where t1.id=#{id} and t1.status=1")
    GoodsDetailVo selectInfoById(@Param("id") Long id);

    List<GoodsDetailVo> queryList(@Param("vo") GoodsQueryVo vo);

    @Select("select pic from app_pic")
    List<String> picList();
}
